package com.wdd.recoveryvehicle.sysToken.service.impl;

import com.wdd.recoveryvehicle.sysToken.bean.SysToken;
import com.wdd.recoveryvehicle.mapper.TokenMapper;
import com.wdd.recoveryvehicle.sysToken.service.SysTokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysTokenServiceImpl implements SysTokenService {

    @Autowired
    private TokenMapper tokenMapper;

    @Override
    public SysToken selectSysTokenByUserId(String user_id) {
        return tokenMapper.selectSysTokenByUserId(user_id);
    }

    @Override
    public SysToken selectSysTokenByToken(String token) {
        return tokenMapper.selectSysTokenByToken(token);
    }

    @Override
    public boolean updateSysTokenByUserId(SysToken sysToken) {
        return tokenMapper.updateSysTokenByUserId(sysToken);
    }

    @Override
    public boolean insertSysToken(SysToken sysToken) {
        return tokenMapper.insertSysToken(sysToken);
    }

    @Override
    public boolean deleteSysTokenByUserId(String user_id) {
        return tokenMapper.deleteSysTokenByUserId(user_id);
    }
}
